import request from '@/utils/request'

export function additionPermit(data) {
  return request({
    url: '/permit',
    method: 'post',
    data
  })
}

export function removePermit(id) {
  return request({
    url: `/permit/${id}`,
    method: 'delete'
  })
}

export function updatePermit(data) {
  return request({
    url: '/permit',
    method: 'put',
    data
  })
}

export function searchPermit(data, pageNum, pageSize) {
  return request({
    url: '/permit',
    method: 'get',
    params: Object.assign({}, data, { current: pageNum, size: pageSize })
  })
}
